package com.yanze.customviewdemo.widget;

import android.app.Activity;

import java.util.ArrayList;
import java.util.List;

public class ActivityProvider {

    public static List<Activity> activityList = new ArrayList<>();

    public static void saveActivity(Activity activity) {
        activityList.clear();
        activityList.add(activity);
    }

    public static Activity getActivity() {
        if (activityList.isEmpty()) {
            return null;
        }else{
            return activityList.get(0);
        }
    }
}
